/*--------------------------------------------------------------------------------*/
#ifndef __TIMER__
#define __TIMER__
/*--------------------------------------------------------------------------------*/
#include "primitives.h"
#include "object.h"
#include <SDL/SDL.h>
/*--------------------------------------------------------------------------------*/
class TIMER
{

public:

    // .. TYPES


    // .. CONSTRUCTORS

    TIMER() : SecondCount(0)
    {

    }

    TIMER( REAL second_count )
    {
        SecondCount = second_count;
    }

    // .. METHODS

    REAL GetSecondCount() const
    {
        return SecondCount;
    }

    // .. OPERATORS

    TIMER operator+( const TIMER & other )
    {
        return TIMER( SecondCount + other.SecondCount );
    }

    TIMER operator-( const TIMER & other )
    {
        return TIMER( SecondCount - other.SecondCount );
    }

    // .. FUNCTIONS

    static TIMER GetCurrentTime()
    {

        //return TIMER( glfwGetTime() );
    	return TIMER( SDL_GetTicks() / 1000.0f );
    }

private:

    // .. ATTRIBUTES

    REAL
		SecondCount;

};
/*--------------------------------------------------------------------------------*/
#endif



